package sale.wxb.loveshopping.annotation;

import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
import sale.wxb.loveshopping.enums.ListOrderEnum;

import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;

@Target({ElementType.METHOD, ElementType.ANNOTATION_TYPE, ElementType.TYPE})
@Retention(RetentionPolicy.RUNTIME)
@ApiImplicitParams({
        @ApiImplicitParam(dataType = "int", name = "page", value = "页码", defaultValue = "1"),
        @ApiImplicitParam(dataType = "int", name = "size", value = "每页大小", defaultValue = "10"),
        @ApiImplicitParam(name = "keyword", value = "关键词", defaultValue = ""),
        @ApiImplicitParam(dataTypeClass = ListOrderEnum.class, name = "order", value = "排序", defaultValue = "DESC")
})
/**
 * 对于列表查询接口常用的参数 该注解本身不实现任何东西
 */
public @interface ApiListParams {
}
